package com.xltt.vehicleControl.bean;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * description v2
 *
 * @author shenzw
 * @version 1.0
 * date: 19-9-20 上午10:52
 * history:
 */
public class Configuration implements Serializable {
    private String vin;
    //燃料类型
    private String fuelType;
    //驱动类型 1:combustionEngine，
    //2:hybrid
    //3:pluginHybrid
    //4:batteryElectric 5:mhev
    private String propulsionType;

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public String getFuelType() {
        return fuelType;
    }

    public void setFuelType(String fuelType) {
        this.fuelType = fuelType;
    }

    public String getPropulsionType() {
        return propulsionType;
    }

    public void setPropulsionType(String propulsionType) {
        this.propulsionType = propulsionType;
    }

    /**
     * 是否是混动车
     * @return boolean
     */
    public boolean isHybridCar(){
        return !TextUtils.isEmpty(propulsionType)
                && (propulsionType.equals("2") || propulsionType.equals("3"));
    }

    /**
     * 是否是电动车
     * @return boolean
     */
    public boolean isElectricCar(){
        return !TextUtils.isEmpty(propulsionType)
                && propulsionType.equals("4") ;
    }
}
